package com.javaGame.role;

import com.javaGame.frame.MainFrame;
import com.javaGame.util.ImageChange;

import java.awt.*;

/**
 * 击中爆炸效果
 */
public class ByHitBom  extends BaseRole{
    /**击中效果图片*/
    public static Image[] byHitImg;
    /**图片切换对象*/
    private ImageChange imageChange = new ImageChange(3);
    /**计数器*/
    private int count;
    public ByHitBom(int x, int y) {
        super(x, y, 30, 30);
    }

    @Override
    public void move() {
        this.currentImg = imageChange.change(byHitImg);
        count++;
        if(count > 12){
            MainFrame.roleList.remove(this);
        }
    }
}
